//
//  FQFillInfoHeaderView.swift
//  SwiftProject
//
//  Created by 董駸 on 2022/8/23.
//

import UIKit

class FQFillInfoHeaderView: UIView {
    
    convenience init(_ type : FillType) {
        self.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: 104))
        
        let titleLb = QMUILabel(font: .mSFont(21), textColor: .color51)
        addSubview(titleLb)
        
        titleLb.snp.makeConstraints { make in
            make.left.equalTo(20)
            make.top.equalTo(32)
        }
        
        let subTitleLb = QMUILabel(font: .rSFont(13), textColor: .color153)
        subTitleLb.numberOfLines = 0
        addSubview(subTitleLb)
        
        subTitleLb.snp.makeConstraints { make in
            make.left.equalTo(titleLb)
            make.top.equalTo(titleLb.snp.bottom).offset(5)
            make.right.equalTo(-20)
        }
        
        switch type {
        case .kinsfolk:
            titleLb.text = "亲属关系填写"
            subTitleLb.text = "应资方要求请完善联系人，信息加密，平台不会拨打"
        case .baseInfo:
            titleLb.text = "个人资料填写"
            subTitleLb.text = "应资方要求，请如实完成以下资料"
        }
    }
}
